package com.yyk.yiliao.util.rx;

import com.yyk.yiliao.BuildConfig;
import com.yyk.yiliao.bean.*;

import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Administrator on 2018/8/4 0004.
 * 做一个有高逼咯的马龙
 */

public interface ApiService {
    String DEV_H5_URL = "http://test99.yunyikang.cn/h5/";
    String RELEASE_H5_URL = "https://www.yunyikang.cn/h5/";

    String DEV_URL = "http://test99.yunyikang.cn"; //测试接口
    String RELEASE_URL = "https://www.yunyikang.cn"; //正式接口

    String BASE_URL = BuildConfig.API_TYPE ? DEV_URL : RELEASE_URL;
    String H5_URL = BuildConfig.API_TYPE ? DEV_H5_URL : RELEASE_H5_URL;

    /*--------------------------------------------------------------------------------------------------*/
    /**
     * H5网址
     */
    String H5_URL_HOSPITALH = H5_URL + "views/Hospital/HospitalInfo.html?Scources=3&hid=";
    String H5_URL_DECTOR = H5_URL + "views/Hospital/DoctorsInfo.html?Sources=3&did=";
    String H5_URL_SHARE = H5_URL + "views/setting/ShareInfo.html?from=app";

    //底部新闻列表
    String H5_URL_NEWDISCOVER = H5_URL + "views/newDiscover/DiscoverInfo.html?tid=";
    //医生预约页面
    String H5_URL_HOSPITALD = H5_URL + "views/Hospital/DoctorsInfo.html?from=app&did=";
    //药店详情
    String H5_URL_HARMACY = H5_URL + "views/shopping/PharmacyInfo.html?from=app&Sources=3";



    /*--------------------------------------------------------------------------------------------------*/
    /**
     * 请求声明
     */
    //请求方式 标识  ,在正常的开发中， 后台会给你一个接口地址，括号里面可以用｛Test｝取代快 搭配@Path 动态使用
    //    //简单的表单形式
    //    @POST("{request}")
    //    @FormUrlEncoded
    //    Observable<Find_INFOs> postUrlFind(@Path("request") String request, @FieldMap @Nullable Map<String, String> hashMap);
    /*--------------------------------------------------------------------------------------------------*/

    /**
     * 应该都是第一期的接口
     *
     * @param hashMap
     * @return
     */

    //验证码
    @FormUrlEncoded
    @POST("mobile/Alidayu/sendSMS")
    Observable<Sendsms_Info> postSendsms(@FieldMap Map<String, String> hashMap);

    //首页预约挂号  医院类型
    @FormUrlEncoded
    @POST("mobile/common/typehospital")
    Observable<CommonTypehospitaInfo> postCommonTypehospita(@FieldMap Map<String, String> hashMap);

    //首页预约挂号  医院等级
    @FormUrlEncoded
    @POST("mobile/common/hospitalgrade")
    Observable<CommonHospitalgradeInfo> postCommonHospitalgrade(@FieldMap Map<String, String> hashMap);

    //首页预约挂号  医院 --医生列表
    @FormUrlEncoded
    @POST("mobile/common/recommsearch")
    Observable<CommonRecommsearchInfo> postCommonRecommsearch(@FieldMap Map<String, String> hashMap);

    //首页预约挂号  医院 --医生列表---添加人员选择
    @FormUrlEncoded
    @POST("mobile/mymessage/visitlis")
    Observable<MymessageVisitlisInfo> postMymessageVisitlis(@FieldMap Map<String, String> hashMap);


    //添加人员选择--有身份证
    @FormUrlEncoded
    @POST("mobile/mymessage/visitadd")
    Observable<MymessageVisitaddInfo> postMymessageVisitadd(@FieldMap Map<String, String> hashMap);

    //就诊成员管理---- 查看信息
    @FormUrlEncoded
    @POST("mobile/mymessage/visitlook")
    Observable<MymessageVisitlookInfo> postMymessageVisitlook(@FieldMap Map<String, String> hashMap);

    //就诊成员管理---- 查看信息
    @FormUrlEncoded
    @POST("mobile/mymessage/visidel")
    Observable<MymessageVisideInfo> postMymessageViside(@FieldMap Map<String, String> hashMap);

    //挂号记录
    @FormUrlEncoded
    @POST("mobile/mymessage/record")
    Observable<MymessageRecordInfo> postMymessageRecord(@FieldMap Map<String, String> hashMap);

    //定位筛选
    @FormUrlEncoded
    @POST("/mobile/common/screen")
    Observable<CommonScreenInfo> postCommonScreen(@FieldMap Map<String, String> hashMap);


    /*--------------------------------------------------------------------------------------------------*/

    @FormUrlEncoded
    @POST("mobile/department/getArticle")
    Observable<Find_INFOs> postUrlFind(@FieldMap Map<String, String> hashMap);

    @POST("mobile/common/dolist")
    Observable<Dolists_Info> postUrlDolist();

    @FormUrlEncoded
    @POST("mobile/common/hlist")
    Observable<Hlist_Info> postUrlHlist(@FieldMap Map<String, String> hashMap);


    //接口1：首页健康头条
    @FormUrlEncoded
    @POST("mobile/Home/title")
    Observable<HomeTitle_Info> postHomeTitle(@FieldMap Map<String, String> hashMap);

    // 接口2：首页健康推荐
    @FormUrlEncoded

    @POST("mobile/Home/goods")
    Observable<HomeGoods_Info> postHomeDrug(@FieldMap Map<String, String> hashMap);

    // 接口3：首页医院推荐图
    @FormUrlEncoded
    @POST("mobile/Home/homemiddle")
    Observable<HomeHomemiddle_Info> postHomeHomemiddle(@FieldMap Map<String, String> map);

    //接口4：推荐医生
    @FormUrlEncoded
    @POST("mobile/Home/doctorlist")
    Observable<HomeDoctorlist_Info> postHomeDoctorlist(@FieldMap Map<String, String> map);

    //接口5：推荐医院
    @FormUrlEncoded
    @POST("mobile/Home/hospitallist")
    Observable<HomeHospitallist_Info> postHomeHospitallist(@FieldMap Map<String, String> map);


    //接口6：推荐科室
    @FormUrlEncoded
    @POST("mobile/Home/departmentlist")
    Observable<HomeDepartmentlist_Info> postHomeDepartmentlist(@FieldMap Map<String, String> map);

    //接口7：推荐病种
    @FormUrlEncoded
    @POST("mobile/Home/diseaselist")
    Observable<HomeDiseaselist_Info> postHomeDiseaselist(@FieldMap Map<String, String> map);

    //接口8：附近药店
    @FormUrlEncoded
    @POST("/mobile/store/near")
    Observable<StoreNear_Info> postStornear(@FieldMap Map<String, String> map);

    //接口9：某药店商品列表
    @FormUrlEncoded
    @POST("/mobile/store/goodslist")
    Observable<StoreGoodslist_Info> postStoreGoodslist(@FieldMap Map<String, String> map);

    //接口10：药店详情
    @FormUrlEncoded
    @POST("/mobile/store/storeinfo")
    Observable<StoreStoreinfo_Info> postStoreStoreinfo(@FieldMap Map<String, String> map);

    //接口11：商城首页今日特价
    @FormUrlEncoded
    @POST("mobile/shop/todaydeal")
    Observable<ShopTodaydeal_Info> postShopTodaydeal(@FieldMap Map<String, String> map);

    //接口12：商城首页商品推荐   作废
    @POST("mobile/shop/recommend")
    Observable<ShopRecommend_Info> postShopRecommend();

    //接口13：商城首页品牌直销
    @FormUrlEncoded
    @POST("mobile/shop/brand")
    Observable<ShopBrand_Info> postShopBrand(@FieldMap Map<String, String> map);

    //接口14：首页底部发现类别
    @FormUrlEncoded
    @POST("mobile/home/articletype")
    Observable<HomeArticletype_Info> postHomeArticletype(@FieldMap Map<String, String> map);

    //接口15：首页文章列表
    @FormUrlEncoded
    @POST("mobile/home/getads")
    Observable<HomeGetads_Info> postHomeGetads(@FieldMap Map<String, String> map);

    //接口16：商品列表 版本2
    @FormUrlEncoded
    @POST("mobile/store/storegoods")
    Observable<StoreStoregoods_Info> postStoreGoods(@FieldMap Map<String, String> map);

    //接口17：商品列表 版本2
    @FormUrlEncoded
    @POST("mobile/store/goodsinfo")
    Observable<StoreGoodsinfo_Info> postStorGoodsinfo(@FieldMap Map<String, String> map);

    //接口18：相关商品
    @FormUrlEncoded
    @POST("mobile/store/relationgoods")
    Observable<StoreRelationgoods_Info> postStoreRelationgoods(@FieldMap Map<String, String> map);

    //接口19：商品详情规格
    @FormUrlEncoded
    @POST("mobile/store/infotwo")
    Observable<StoreInfotwo_Info> postStoreInfoTwo(@FieldMap Map<String, String> map);

    //接口20：购物车列表（z-y）
    @FormUrlEncoded
    @POST("mobile/cart/cartlist")
    Observable<CartCartlist_Info> postCartCartlist(@FieldMap Map<String, String> map);

    //接口21：购物车添加（z-y）
    @FormUrlEncoded
    @POST("mobile/cart/addcart")
    Observable<CartAddcart> postCartAddcart(@FieldMap Map<String, String> map);


    //接口22：购物车数量修改（z-y）
    @FormUrlEncoded
    @POST("mobile/cart/opcart")
    Observable<CartOpcart_Info> postCartOpcart(@FieldMap Map<String, String> map);


    //接口23：购物车商品批量删除（z-y）
    @FormUrlEncoded
    @POST("mobile/cart/delcart")
    Observable<CartDelcart_Info> postCartDelcart(@FieldMap Map<String, String> map);

    //接口26：商品分类列表（z-y）
    @FormUrlEncoded
    @POST("mobile/store/customclass")
    Observable<StoreCustomclass_Info> postStoreCustomclass(@FieldMap Map<String, String> map);


    //接口27：获取用户收货地址列表（whm）
    @FormUrlEncoded
    @POST("mobile/useraddress/useraddress_list")
    Observable<UseraddressList_Info> postUseraddresslist(@FieldMap Map<String, String> map);

    //接口28：获取省市区id（whm）
//    @FormUrlEncoded
//    @POST("mobile/useraddress/area")
//    Observable<UseraddressArea_Info> postUseraddressArea(@FieldMap HashMap<String, String> map);

    //接口29：添加收货地址（whm）
    @FormUrlEncoded
    @POST("mobile/useraddress/useraddress_add")
    Observable<UseraddressAdd_Info> postUseraddressAdd(@FieldMap Map<String, String> map);

    //接口30：获取编辑用户收货地址信息（whm）
    @FormUrlEncoded
    @POST("mobile/useraddress/useraddress_edit_info")
    Observable<UseraddressEditInfo_Info> postUseraddressEditInfo(@FieldMap Map<String, String> map);

    //接口31：编辑用户收货地址信息（whm）
    @FormUrlEncoded
    @POST("mobile/useraddress/useraddress_edit")
    Observable<UseraddressEdit_Info> postUseraddressEdit(@FieldMap Map<String, String> map);

    //接口32：删除用户收货地址信息（whm）
    @FormUrlEncoded
    @POST("mobile/useraddress/useraddress_del")
    Observable<UseraddressDel_Info> postUseraddressDel(@FieldMap Map<String, String> map);

    //接口33：商城首页底部商品类别   (ggk)
    @FormUrlEncoded
    @POST("mobile/shop/goodstype")
    Observable<ShopGoodstype_Info> postShopGoodstype(@FieldMap Map<String, String> map);

    //接口34：商城首页底部商品列表 (ggk)
    @FormUrlEncoded
    @POST("mobile/shop/goodslist")
    Observable<ShopGoodslist_Info> postShopGoodlist(@FieldMap Map<String, String> map);


    //接口35：文章详情 (ggk)
    @FormUrlEncoded
    @POST("mobile/home/articledata")
    Observable<HomeArticledata_Info> postHomeArticledata(@FieldMap Map<String, String> map);

    //接口36：发现页面三个标题 (ggk)
    @FormUrlEncoded
    @POST("mobile/home/articletitle ")
    Observable<HomeArticletitle_Info> postHomeArticletitle(@FieldMap Map<String, String> map);

    //接口37：发现页名医推荐(ggk)
    @FormUrlEncoded
    @POST("mobile/home/doctordata")
    Observable<HomeDoctordata_Info> postHomeDoctordata(@FieldMap Map<String, String> map);

    //接口38：首页搜索医院或者医生(ggk)
    @FormUrlEncoded
    @POST("mobile/home/homelist")
    Observable<HomeHomelist_Info> postHomeHomelist(@FieldMap Map<String, String> map);


    //接口39：发现列表搜索文章
    @FormUrlEncoded
    @POST("mobile/home/articlelist")
    Observable<HomeArticlelist> postHomeArticlelist(@FieldMap Map<String, String> map);

    //接口40  ：购物车结算（whm）
    @FormUrlEncoded
    @POST("mobile/cart/cartpay")
    Observable<CartCartpay_Info> postCartCartpay(@FieldMap Map<String, String> map);

    //接口41：提交订单（whm）
    @FormUrlEncoded
    @POST("mobile/order/sub_order")
    Observable<OrderSubOrder_Info> postOrderSubOrder(@FieldMap Map<String, String> map);

    //接口42：订单列表（ggk）
    @FormUrlEncoded
    @POST("mobile/cart/orderlist")
    Observable<CartOrderlist> postCartOrderlist(@FieldMap Map<String, String> map);

    //接口43：购物车数量(ggk)
    @FormUrlEncoded
    @POST("mobile/cart/countkey")
    Observable<OrderCartCountkey_Info> postCarCountkey(@FieldMap Map<String, String> map);

    //接口44：重新下单/订单详情（whm）
    @FormUrlEncoded
    @POST("mobile/order/order_restart")
    Observable<OrderOrderRestart_Info> postOrderOrderRestart(@FieldMap Map<String, String> map);


    //接口45：修改订单状态 确认收货 取消订单(ggk)
    @FormUrlEncoded
    @POST("mobile/cart/statuskey")
    Observable<CartStatuskey_Info> postCartStatuskey(@FieldMap Map<String, String> map);

    //接口46：删除订单(ggk)

    @FormUrlEncoded
    @POST("mobile/cart/orderdel")
    Observable<CartOrderdel_Info> postCartOrderdel(@FieldMap Map<String, String> map);

    //接口47：单个订单支付（whm）
    @FormUrlEncoded
    @POST("mobile/order/order_pay")
    Observable<OderOrderPay_Info> postOderOrderPay(@FieldMap Map<String, String> map);

    //接口48：商城首页搜索商品(ggk)
    @FormUrlEncoded
    @POST("mobile/home/homegoods")
    Observable<HomeHomegoods_Info> postHomeHomegoods(@FieldMap Map<String, String> map);

    //接口49：再次购买（whm）
    @FormUrlEncoded
    @POST("mobile/order/buy_again")
    Observable<OderBuy_Info> postOderBuy(@FieldMap Map<String, String> map);


    //接口49:App医院列表 (ggk)
    @FormUrlEncoded
    @POST("mobile/common/hospital")
    Observable<CommoeHospital_Info> postCommoeHospital(@FieldMap Map<String, String> map);
    //接口55:App微信授权(ggk)

    @FormUrlEncoded
    @POST("mobile/common/wxauthorization")
    Observable<CommonWxauthorization_Info> postCommonWxathorization(@FieldMap Map<String, String> map);


    //接口56：就诊成员未领取身份证新增(ggk)
    @FormUrlEncoded
    @POST("mobile/Mymessage/patientadd")
    Observable<MymessagePatientadd_Info> postMymessagePatientadd(@FieldMap Map<String, String> map);
    //接口57：就诊成员列表 (ggk) OK
//    @FormUrlEncoded
//    @POST("mobile/Mymessage/visitlis")
//    Observable<MymessagePatientadd_Info> postMymessagePatientadd(@FieldMap HashMap<String, String> map);

    //接口60:预约订单支付(ggk)
    @FormUrlEncoded
    @POST("mobile/order/makey_registration")
    Observable<OrderMakeyRegistation_Info> postOrderMakeyRegistation(@FieldMap Map<String, String> map);

    //接口61:微信支付
    @FormUrlEncoded
    @POST("mobile/order/wechat_unifiedorder")
    Observable<WechatUnifiedorder_Info> postWechatUnifiedorder(@FieldMap Map<String, String> map);

    /**
     * todo https://docs.qq.com/doc/DTWRWZU9KRmxieEFh?opendocxfrom=admin
     */
    //1：问诊订单提交（ggk）
    @FormUrlEncoded
    @POST("mobile/orderdoctor/order_chat")
    Observable<OrderdoctorOrder_chatInfo> postOrderdoctorOrder_chat(@FieldMap Map<String, String> map);
    /**
     * 支付  ----------------------
     */

    /**
     * 接口1：设置交易密码（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/set_pwd")
    Observable<UserbankSetpwdInfo> postUserbankSetpwd(@FieldMap Map<String, String> map);

    /**
     * 接口2：我的账户（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/my_account")
    Observable<UserbankMyaccountInfo> postUserbankMyaccount(@FieldMap Map<String, String> map);

    /**
     * 接口3：绑卡（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/tying_bank")
    Observable<UserbankTyingbankInfo> postUserbankTyingbank(@FieldMap Map<String, String> map);

    /**
     * 接口4：检验交易密码（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/test_pwd")
    Observable<UserbankTestpwdInfo> postUserbankTestpwd(@FieldMap Map<String, String> map);


    /**
     * 接口5：修改交易密码（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/edit_pwd")
    Observable<UserbankEditpwdInfo> postUserbankEditpwd(@FieldMap Map<String, String> map);

    /**
     * 接口6：找回交易密码验证手机（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/retrieve_pwd")
    Observable<UserbankRetrieveInfo> postUserbankRetrieve(@FieldMap Map<String, String> map);

    /**
     * 接口7：银行列表（ggk）
     */

    @POST("mobile/Userbank/bank_card")
    Observable<UserbankBankcardInfo> postUserbankBankcard();

    /**
     * 接口8：我的银行卡（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/my_bankcard")
    Observable<UserbankMybankcardInfo> postUserbankMybankcard(@FieldMap Map<String, String> map);

    /**
     * 接口9：患者提现（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/money_carry")
    Observable<OrderMoneycarryInfo> postOrderMoneycarry(@FieldMap Map<String, String> map);

    /**
     * 接口10：患者解绑银行卡（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/untying")
    Observable<UserbankUntyingInfo> postUserbankUntying(@FieldMap Map<String, String> map);

    /**
     * 接口11：是否设置交易密码（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/setup_pwd")
    Observable<UserbankSetuppwdInfo> postUserbankSetuppwd(@FieldMap Map<String, String> map);

    /**
     * 接口12：提现参数返回（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/get_type")
    Observable<OrderGettypeInfo> postOrderGettype(@FieldMap Map<String, String> map);

    /**
     * 接口13：充值（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/recharge")
    Observable<OrderRechargeInfo> postOrderRecharge(@FieldMap Map<String, String> map);

    /**
     * 接口14：充值参数（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/get_charge")
    Observable<OrderGetchargeInfo> postOrderGetcharge(@FieldMap Map<String, String> map);

    /**
     * 接口15：添加银行卡第一步（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/sup_card")
    Observable<OrderSupcardInfo> postOrderSupcard(@FieldMap Map<String, String> map);

    /**
     * 接口16：绑定银行卡第二步（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/phone_card")
    Observable<OrderPhonecardInfo> postOrderPhonecard(@FieldMap Map<String, String> map);

    /**
     * 接口17：绑定银行卡第三步(发送验证码)（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/userbank/code_card")
    Observable<UserbankCodecardInfo> postUserbankCodecard(@FieldMap Map<String, String> map);

    /**
     * 接口18：绑定银行卡第四步(验证验证码)（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/code_get")
    Observable<OrderCodegetInfo> postOrderCodeget(@FieldMap Map<String, String> map);

    /**
     * 接口19：重发验证码（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/code_new")
    Observable<OrderCodenewInfo> postOrderCodenew(@FieldMap Map<String, String> map);

    /**
     * 接口20：合作银行（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/close_bank")
    Observable<OrderClosebankInfo> postOrderClosebank(@FieldMap Map<String, String> map);


    /**
     * 接口21：银行卡充值(发送短信)（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/rec_money")
    Observable<OrderRecmoneyInfo> postOrderRecmoney(@FieldMap Map<String, String> map);

    /**
     * 接口22：验证支付短信（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/check_code")
    Observable<OrderCheckcodeInfo> postOrderCheckcode(@FieldMap Map<String, String> map);

    /**
     * 接口23：重发支付短信（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/paySms")
    Observable<OrderPaysmsInfo> postOrderPaysms(@FieldMap Map<String, String> map);

    /**
     * 接口24：明细列表（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/user_detailed")
    Observable<UserbankUserdetailedInfo> postUserbankUserdetailed(@FieldMap Map<String, String> map);

    /**
     * 接口25：明细详情（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/Userbank/uinfo_detailed")
    Observable<UserbankUinfodetailedInfo> postUserbankUinfodetailed(@FieldMap Map<String, String> map);

    /**
     * 接口26：商品购买--预约挂号银行卡支付（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/order/business_bank")
    Observable<OrderBusinessbankInfo> postOrderBusinessbank(@FieldMap Map<String, String> map);

    /**
     * 接口27：患者主页（ggk）
     */
    @FormUrlEncoded
    @POST("mobile/userbank/users")
    Observable<UserbankUsersInfo> postUserbankUsers(@FieldMap Map<String, String> map);
//    /**
//     * 接口28：绑卡支付订单号获取token（whm）
//     */
//    @FormUrlEncoded
//    @POST("mobile/order/orderToken")
//    Observable<OrderOrdertokenInfo> postOrderOrdertoken(@FieldMap Map<String, String> map);

    /**
     * 医生端 1.20 接口10：余额支付（whm）
     */
    @FormUrlEncoded
    @POST("mobile/order/pay_balance")
    Observable<OrderPaybalanceInfo> postOrderPaybalance(@FieldMap Map<String, String> map);

}
 